package com.dhcc.wb.yijian;

import com.dhcc.common.database.DBManager;
import org.apache.log4j.Logger;

/**
 * @author wanggx
 * @date 2019/12/3 17:51
 */
public class WxIdeaDao {
    private static Logger logger = Logger.getLogger(WxIdeaAction.class);
    //添加反馈意见
    public int addWxIdea(String id, String name, String bumeng, String time, String neirong, String update_time, String phone){
        int i=0;
        DBManager dbm = null;
        try{
            dbm = new DBManager();
            String sql = "insert into wx_idea(id,name,bumeng,time,neirong,update_time,phone) values" +
                    "('"+ id +"','"+name+"','"+bumeng+"','"+time+"','"+neirong+"','"+update_time+"','"+phone+"')";
            i = dbm.executeUpdate(sql);
            logger.info("增加意见的sql"+sql);
        }catch(Exception e){
            e.printStackTrace();
        }finally{
            dbm.close();
        }
        return i;
    }


}
